package com.zx.exception;

/**
 * Created by Administrator on 2016/5/25.
 */
public class GlobalServiceException extends RuntimeException {

    public GlobalServiceException(String errorMsg) {
        super(errorMsg);
        this.errorMsg = errorMsg;
    }

    public GlobalServiceException(String errorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public GlobalServiceException(String errorMsg, Throwable cause) {
        super(errorMsg, cause);
        this.errorMsg = errorMsg;

    }

    /**
     * 错误信息
     */
    protected String errorMsg;
    /**
     * 错误编码
     */
    protected String errorCode;

    public String getErrorMsg() {
        return errorMsg;
    }
}
